<template>
	<view class="base-copy" @click="handleCopy">
		<view class="base-copy__text">{{ props.value }}</view>
		<!-- <view class="base-copy__icon"><uv-icon name="file-text" size="16" color="#4c7bfd"></uv-icon></view> -->
	</view>
</template>

<script setup>
import Taro from '@tarojs/taro';
const props = defineProps({
	value: {
		type: String,
		default: ''
	}
});

const { proxy } = getCurrentInstance();

const handleCopy = () => {
	Taro.setClipboardData({
		data: props.value,
		success: () => {
			proxy.$toast.success('复制成功');
		}
	});
};
</script>

<style lang="scss" >
.base-copy {
	display: flex;
	align-items: center;
	justify-content: center;
  font-size: 14px;
}
</style>
